package com.sunny.hp.qr;

import java.util.ArrayList;
import java.util.LinkedHashMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.view.json.MappingJacksonJsonView;

import com.sunny.hp.common.servlet.ModelAndNCOMZView;
import com.sunny.hp.common.util.HttpRequest;
import com.sunny.hp.qr.service.QRService;
@Controller
@RequestMapping("/qr")
public class QRController {

	/** document                               
	 * @ClassName  : class_name       
	 * @Date         : 2014. 12. 23.         
	 * @작성자      : P044826           	 
	 * @변경이력 :                        
	 * @프로그램 설명 :                     
	 */
	
	@Autowired
	private QRService qrService;
	
	/**  직원 정보 					
	* @Method Name  : selectMenuList   		
	* @작성일   : 2014년09월12일(14:05:50)                    		
	* @작성자   : 신용천(nComz)                    		
	* @변경이력  :                           		
	* @Method 설명 : 메뉴리스트 가져오기                         		
	* @param request HttpServletRequest
	* @param response HttpServletResponse
	* @return mav                                	
	*/
 	@RequestMapping(value="/selectQRMemberInfo.do")
	public ModelAndNCOMZView selectQRMemberInfo(HttpServletRequest request, HttpServletResponse response) throws Exception {
			ModelAndNCOMZView mav   	= new ModelAndNCOMZView(request,new MappingJacksonJsonView());
	HttpRequest requestUtil = new HttpRequest(request); 
	LinkedHashMap param = requestUtil.paramBind(); 
	LinkedHashMap retMap = new LinkedHashMap();
	try {
		retMap = qrService.selectQRMemberInfo(param);
		mav.addObject("memMap", retMap); 
		} catch (Exception e) {
			e.printStackTrace(); 
		} 
	mav.setViewName("qr/selectQRMemberInfo");
	return mav;
	}
}
